Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add se resnet 152 profile script #84

Merged
merged 7 commits into from
Mar 28, 2018
Merged

add se resnet 152 profile script #84

merged 7 commits into from
Mar 28, 2018

Conversation

jacquesqiao
Copy link
Collaborator

No description provided.



def parse_args():
parser = argparse.ArgumentParser('resnet152 parallel profile.')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resnet152 ->SE-Resnet-152

feed_dict = feeder.feed(data)

for pass_id in range(1):
with profiler.profiler('All', 'total', '/tmp/profile') as prof:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exchange line 223 and line 224?

exe.run(fluid.default_main_program(),
feed=feed_dict,
fetch_list=[],
use_program_cache=True)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer writing the line229~line238 together.

exe.run(fluid.default_main_program(),
             feed=feeder.feed(train_reader_iter.next()) if args.use_python_reader else feed_dict,
              fetch_list=[],
              use_program_cache=True)

use_program_cache=True)
train_stop = time.time()
if step_id > args.skip_first_steps:
train_time += train_stop - train_start
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the prof also needs warm up.

regularization=fluid.regularizer.L2Decay(1e-4))
opts = optimizer.minimize(avg_cost)

# fluid.memory_optimize(fluid.default_main_program())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove this?
For big batch_size, such as 12, the model will be oom, if without memory_optimize.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add back, I think it's a option for user to test.



def time_stamp():
return int(round(time.time() * 1000))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is time_stamp used to do?

regularization=fluid.regularizer.L2Decay(1e-4))
opts = optimizer.minimize(avg_cost)

fluid.memory_optimize(fluid.default_main_program())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it is better that adding an argument, such as use_memopt.

@jacquesqiao jacquesqiao merged commit 395d7fe into dzhwinter:master Mar 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants